fix: truapi ^0.4 products connect via MessagePort handoff - #42
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
|
||
| import { getClientSync } from '@parity/truapi/sandbox'; | ||
|
|
||
| const DOTNS_ID = 'test-product.dot'; |
There was a problem hiding this comment.
Any reason for this ID specifically?
There was a problem hiding this comment.
No particular reason, it's just what is used in the tests
host-api-test-sdk/test/test-product.ts
Line 15 in 017d7b7
pgherveou
left a comment
There was a problem hiding this comment.
Shouldn't we completely migrate away from @novasamatech/* deps.
project that still need to test out the legacy stack can use a pinned version of host-api-test-sdk
| */ | ||
|
|
||
| import type { Provider } from '@novasamatech/host-api'; | ||
| import { createIframeProvider } from '@novasamatech/host-container'; |
There was a problem hiding this comment.
can we move all the @novasamatech/* related code in a legacy file, to make it easier to clean up in a follow up PR if we think we do need the dual mode for now
There was a problem hiding this comment.
As the newest version of truapi containing the core was just released and it is just now landing on product-sdk. I think it is better to first add this patch and then cleanup novasama deps as to not introduce any breaking changes
What
@parity/truapi 0.4products open the iframe channel by postingtruapi-readyand waiting for a
truapi-initreply with a transferred MessagePort. The testhost never answered, so
waitForConnection()timed out on every 0.4 product.The host now answers the handshake and serves all traffic over the port.
0.3 products keep using plain window postMessage; both generations talk to the
same container.